import request from '@/utils/request'

// 查询配料信息列表
export function listIngredients(query) {
  return request({
    url: '/stock/ingredients/list',
    method: 'get',
    params: query
  })
}

// 查询烧结矿化学成分列表
export function chemistryIngredientsList(query) {
  return request({
    url: '/stock/ingredients/chemistryIngredientsList',
    method: 'get',
    params: query
  })
}

// 查询配料信息详细
export function getIngredients(id) {
  return request({
    url: '/stock/ingredients/' + id,
    method: 'get'
  })
}

// 新增配料信息
export function addIngredients(data) {
  return request({
    url: '/stock/ingredients/',
    method: 'post',
    data: data
  })
}

// 修改配料信息
export function updateIngredients(data) {
  return request({
    url: '/stock/ingredients/mixedIngredients',
    method: 'put',
    data: data
  })
}

// 修改烧结矿化学成分
export function updateChemicalIngredient(data) {
  return request({
    url: '/stock/ingredients/chemistryIngredients',
    method: 'put',
    data: data
  })
}

// 删除配料信息
export function delIngredients(id) {
  return request({
    url: '/stock/ingredients/' + id,
    method: 'delete'
  })
}

// 导出配料信息
export function exportIngredients(query) {
  return request({
    url: '/stock/ingredients/export',
    method: 'get',
    params: query
  })
}
